package com.uphone.magicleafteacher.pro.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.uphone.magicleafteacher.R;
import com.uphone.magicleafteacher.vo.FuncitionBean;

import java.util.List;

/**
 * Time: 2019/10/29
 */
public class HomefunctionAdapter extends BaseQuickAdapter<FuncitionBean, BaseViewHolder> {
    public HomefunctionAdapter(@Nullable List<FuncitionBean> data) {
        super(R.layout.item_home_function, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FuncitionBean item) {
        helper.setImageResource(R.id.item_image, item.getImage());
        helper.setText(R.id.item_name, item.getName());
        helper.addOnClickListener(R.id.rl_function);
    }
}
